home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / con_005c.zip / CONCORD.RAR / SELECT.DOC < prev    next >
Text File  |  1997-04-25  |  20KB  |  586 lines

  1.                                            Copenhagen 16. December 1994
  2.  
  3.  
  4.  
  5.        How to make a "Selection menu" in Concord step by step.
  6.  
  7.  
  8.                        By Bjarke V. Lindberg
  9.  
  10.                        Fido           2:235/335
  11.                        InterNet       bjarke@ibm.net.dk
  12.  
  13.  
  14. One of the strongest features in the new BBS software named Concord, is
  15. the possibility to make "Selection menus". It means that the user only
  16. has to use the cursor keys to highlight a menu item and then press Enter
  17. to select it! At the first look, this may seem a little confusing but
  18. when you get used to it, you'll see how logical it is.
  19.  
  20. This is a "step by step" example on making a selection menu in Concord.
  21. There are many ways to do this but I find this way to be the easiest.
  22. You'll probably find another way to do it when you get familiar with the
  23. menu editor in Concord but until then you can do it my way.
  24.  
  25. Beside you now, you should have the Concord documents, the file called
  26. MENUTYPE.DOC and the file called MACROS.DOC. I'll not explain you all
  27. the macros and ^-codes, you have to read these documents by yourself ;-)
  28.  
  29. Before you start:
  30.  
  31. You'll have to make some thoughts about what the menu should do. For a
  32. start you can try to use the sample menus that came with your Concord
  33. package. They include some of the most used options in Concord (and
  34. other BBS systems as well), but there are tons of options in Concord,
  35. and the examples are just the most ordinary items.
  36.  
  37. You'll also have to have an ANSI drawing package. I'm using "The draw",
  38. but there are also other packages available. If you're using "The draw"
  39. you must accept, that you cannot make "Hidden" menu items, because "The
  40. draw" "pack" the ansi file, and in the hidden menu item option, the
  41. "["-bracket HAS to be the first character in the line. If you are
  42. familiar with ansi-codes, you can use for example "Q-edit". (Pasi, the
  43. author of Concord, maked all the example ansi's in this editor!).
  44. These programs mentioned here, are all shareware, remember to register
  45. your shareware programs, if you keep using them after the evaluation
  46. period!
  47.  
  48. When I'm making menus in Concord, I can't do it without a printer, so in
  49. this example, I assume that you have a printer attached to your
  50. computer.
  51.  
  52. Another good thing to do before you start, is to make some batch files.
  53. Currently I have three of them:
  54.  
  55. C.BAT:
  56.  
  57.       @ECHO OFF
  58.       D:
  59.       CD\CONCORD
  60.       CONCORD -L -USYSOP;<PASSWORD>
  61.  
  62. This one "emulate" an IEMSI login in local mode, and you don't have to
  63. enter your name and password.
  64.  
  65.  
  66. M.BAT
  67.  
  68.      @ECHO OFF
  69.      D:
  70.      CD\CONCORD\MENUPATH
  71.      CSETUP MENU
  72.  
  73. This one change the path to where you have your menu-files, and starts
  74. up the menu editor. I assume that you have the concord main directory in
  75. your "set path=" statement in your AUTOEXEC.BAT file. (As well as the
  76. "SET CONCORD=DRIVE:\PATH")
  77.  
  78. A.BAT
  79.  
  80.      @ECHO OFF
  81.      D:
  82.      CD\CONCORD\ANSIPATH
  83.      D:\T\TD\THEDRAW.EXE TESTMENU.ANS
  84.  
  85.  
  86. This one change the path to where you have your ansi-files, and starts
  87. up "The draw" with the ansi file belonging to the menufile you're
  88. currenly working on.
  89.  
  90. It's not necessary for your to have these batch files, it just speeds up
  91. the way you make the menus. (If you're doing it like I do) From now on
  92. when I write C.BAT, it means that you should log in locally.
  93.  
  94.  
  95. OK! Let's start making a menu:
  96.  
  97. Start M.BAT, and go to the TOP.MNU. Add an menu item called "+". Make it
  98. show an ansi file with the "Press ENTER to continue"
  99. (General | Show ansi file w/ Enter) It should show the ansi file
  100. TESTANSI.ANS
  101.  
  102.  
  103.  
  104.  
  105.  
  106.                                * STEP 1 *
  107.  
  108. A.BAT                            { Start up The Draw in your ANSI dir.    }
  109.                                  { It'll write "File not found" the first }
  110.                                  { time; ignore this.                     }
  111.  
  112.  
  113. Draw a menu! The good thing about Concord is, that you can make what you
  114. want. Don't be boring, make your menus different than other BBS's.
  115. One of the things I don't like when loggin in other BBS's, is that I can
  116. see which BBS-software they are using! Concord is so flexible, that you
  117. can personalize it as much as you want. There are, for an example, not an
  118. hardcoded welcome sequence in Concord... You can personalize it by
  119. editing the Welcome.scr.
  120.  
  121. If you're using frames around your menus, you can make a macro name a
  122. fixed length by adding a ".XX" after the macro name. E.g.
  123. "@PACKER_NAME@.10" will reserve 10 characters for the name of the
  124. selected packer, even though the packer name only are 3 characters long
  125. f.ex. "ARJ", Concord will expand it to "ARJ       ".
  126.  
  127. When your're finished drawing your menu, save it AS A BLOCK! Name it
  128. TESTANSI.ANS
  129.  
  130.  
  131.                                * STEP 2 *
  132.  
  133. C.BAT (log in locally)
  134.  
  135. Press "+" in the top menu, to be sure Concord write your ansi as you
  136. imagined. If you used frames, see how many spaces you should add/delete
  137. to make it look allright.
  138.  
  139. repeat step 1 - 2 until you're satisfied.
  140.  
  141.  
  142.                               * STEP 3 *
  143.  
  144. A.BAT
  145.  
  146. Save the ansi as the real ansi name. (Remember use a block!)
  147.  
  148. Press the <prt Sc> (Print screen), and wait untill the printer is
  149. finished.
  150.  
  151. Take your printed menu, get a pencil - move the cursor to the starting
  152. character where the highligted box should show up. Write down the cursor
  153. position on the paper.
  154.  
  155. It should look like this on the paper:
  156.  
  157. ──────────────────────── Block this and print it out ───────────────────
  158.  
  159.  
  160.  
  161.  
  162.    ┌──────────────────────────
  163.    │        8 <─┬── Written by you with the pencil..
  164.    │        | <─┘
  165.    │       ┌──────────────────────────────────────┐
  166.    │   3── │Menu Item 1                           │
  167.    │   4── │Menu Item 2 : @SysOp@.04                    │
  168.    │   5── │Menu Item 3 : @ADDRESS1@.25│
  169.        │   └─────────────────────────── ──────────┘
  170.        │                  |
  171.        │                  22
  172.        │                  │
  173.        ├──────────────────┘
  174.        │
  175.        Written by you with the pencil
  176.  
  177.  
  178.  
  179.  
  180. ───────────────────────── We'll use it later on ─────────────────────────
  181.  
  182.  
  183. As you can see at the example above, the first menu item starts at
  184. position 8,4 - the second at position 8,5 - The @SYSOP@ macro starts at
  185. 22,4 - and so on....
  186.  
  187. We have to do it this way, until Pasi adds an ruler in the Menu editors
  188. <F2> menu, but belive me - he has enough to do!!
  189.  
  190.  
  191.  
  192.                               * STEP 4 *
  193.  
  194. M.BAT
  195.  
  196. Add a new menu. (Press "N")
  197.  
  198. Name it TESTMENU.ANS
  199.  
  200. Add an item with the "Aut" in the first colomn. (KEY) It is per default.
  201.  
  202. The next colomn (INPUT) should contain a "#".
  203.  
  204. In the MENUTYPE colomn (column 3), set in the "Show ANSI w/ hotkeys"
  205. It's located in the "General | Show ANSI w/ hotkeys".
  206.  
  207. In the DATAFIELD colomn (column 4) write the name of your ansi file. NB!
  208. without path and extension!! Remember you have told Concord once where
  209. to find it's ansi's - in the language file setup..
  210.  
  211. What we're doing above, is to tell Concord that it automaticly should
  212. show our newly created ansi file, when it loads this menu.
  213.  
  214. All in all it should look like this:
  215. ┌────┬──────────┬───────────────────────────┬───────────────────────────┬───
  216. │KEY │ INPUT    │ MENUTYPE                  │ DATAFIELD                 │ SEC
  217. ├────┼──────────┼───────────────────────────┼───────────────────────────┼───
  218. │Aut │ #        │ Show ANSI w/ hotkeys      │ MENUFILE.ANS              │ 0
  219.  
  220.  
  221.  
  222. These were the easy steps... Next we'll make the selections...
  223.  
  224.  
  225.  
  226.                               * STEP 5 *
  227.  
  228. Before we make the selections, I'll try to explain the way Concord
  229. handles the selection menus.
  230.  
  231. One selection item consists of three lines in the menu editor.
  232.  
  233. The 1st line tells Concord what to do when the user press Enter on it.
  234.  
  235. The 2nd line tells Concord what the line should look like, when it is
  236. highlighted.
  237.  
  238. The 3rd line tells Concord what the line should look like, when it has
  239. been highlighted once and is not anymore. In a other way: How should it
  240. look like when the user leaves that field. (This should look like it
  241. did when you drawed it the first time)
  242.  
  243. The two most used ^-codes in the selections is ^C, ^G and ^L.
  244.  
  245. ^C means what color concord should draw/write (Just like in the .lng
  246. files.)
  247.  
  248. Syntax: ^Cforeground,background;Text
  249.  
  250. Example: ^C4,0;Hello World
  251.          This writes "Hello World" with red foreground color and black
  252.          background color.
  253.  
  254. Color codes:
  255.              ┌───────┬──────┬─────┬──────┬──────┬─────────┬──────┬───────┐
  256. Foreground/  │  0    │  1   │  2  │  3   │  4   │   5     │ 6    │  7    │
  257. Background   │ Black │ Blue │Green│ Cyan │ Red  │ Magenta │Brown │ Light │
  258.              │       │      │     │      │      │         │      │ gray  │
  259.              └───────┴──────┴─────┴──────┴──────┴─────────┴──────┴───────┘
  260.              ┌───────┬──────┬─────┬──────┬──────┬─────────┬──────┬───────┐
  261.              │  8    │  9   │ 10  │  11  │  12  │   13    │  14  │   15  │
  262. Only         │ Dark  │Light │Light│ Light│ Light│  Light  │Yellow│ White │
  263. Foreground   │ gray  │blue  │green│ Cyan │  red │ Magenta │      │       │
  264.              └───────┴──────┴─────┴──────┴──────┴─────────┴──────┴───────┘
  265.  
  266.  
  267. ^G means where the cursor should goto and start write. (I always
  268. remember this by saying to myself: ^Goto)
  269.  
  270. Syntax: ^GX,Y;Text
  271.  
  272. Example: ^G12,10;Hello world
  273.          This will write "Hello World" starting 12 characters to the
  274.          right, and 10 characters down from the upper-left corner of the
  275.          screen.
  276.  
  277. A screen is 80 characters wide and 25 characters high.
  278.  
  279.  
  280. ^L means the length of an enter field.
  281.  
  282. Syntax: ^LXX;
  283.  
  284. Example: ^L10;
  285.          This sets the length of an enter field to 10. The user can
  286.          enter up till 10 characters in the field.
  287.  
  288.  
  289. You can combine the ^-codes, but remember every ^-code ends with a ";".
  290.  
  291.  
  292.  
  293. Example: ^C4,0;^G12,10;Hello World
  294.          This combine the first two examples above.
  295.  
  296. Or     : ^C15,1;^G12,10;Enter your first name :^C14,1;^L10;
  297.          This gives the user a field of 10 characters to enter his name.
  298.  
  299.  
  300. There are three ways an user can make a selection.
  301.  
  302. 1. The user selects the item, and Concord do something. (E.g Goto Menu,
  303.    Run a script, Select Language, etc.)
  304.  
  305.     Yeah... I know "Select Language" is a combination of "Edit user
  306.     info" and the datafield "Language". I'll get back to this
  307.     later.
  308.  
  309. 2. The user selects the item, and Concord TOGGLES a setting. (E.g. "Edit
  310.    user info" | "FILECHK")
  311.  
  312.  
  313. 3. The user selects the item, and Concord should read in some
  314.    information from the user. (E.g "Edit user info" | "ADDRESS1")
  315.  
  316.  
  317.  
  318.                               * STEP 6 *
  319.  
  320.  
  321.  
  322.  
  323. Remembering our first example with the three menu items and the pencil,
  324. we'll try to make a selection of this.
  325.  
  326. Menu Item 1
  327.  
  328. The item should load the "Setup menu".
  329.  
  330.  
  331. Goto your new menu, it still looks like this:
  332.  
  333.  KEY │ INPUT    │ MENUTYPE                  │ DATAFIELD                 │ SEC
  334.  Aut │ #        │ Show ANSI w/ hotkeys      │ TESTMENU.ANS              │ 0
  335.  
  336. Now we have to define, what Concord shall do; it shall goto the setup
  337. menu, when the user press the enter.
  338.  
  339. Ok, let's tell Concord that.
  340.  
  341. Add a line in the menu editor. (Press <INS>)
  342.  
  343.  KEY │ INPUT    │ MENUTYPE                  │ DATAFIELD                 │ SEC
  344.  Aut │ #        │ Show ANSI w/ hotkeys      │ TESTMENU.ANS              │ 0
  345.  Sel │ $        │ Gosub menu                │ SETUP                     │ 0
  346.   │    │               │                        │
  347.   │    └───────────┐   └───────────────┐        └──────────┐
  348. ┌─┴────────────┐ ┌─┴───────────────┐ ┌─┴────────────────┐ ┌┴──────────────┐
  349. │Press ALT-M   │ │Press ALT Gr-"4" │ │ General | Gosub  │ │ Name of the   │
  350. │in this field.│ │                 │ │ menu             │ │ menu to goto  │
  351. │This means    │ └─────────────────┘ └──────────────────┘ └───────────────┘
  352. │Concord will  │
  353. │react on an   │
  354. │press on enter│
  355. └──────────────┘
  356.  
  357. Next we have to tell Concord WHERE the cursor have to be when it shall
  358. react on the press on the Enter:
  359.  
  360.  
  361.  KEY │ INPUT    │ MENUTYPE                  │ DATAFIELD                 │ SEC
  362.  Aut │ #        │ Show ANSI w/ hotkeys      │ TESTMENU.ANS              │ 0
  363.  Sel │ $        │ Gosub menu                │ SETUP                     │ 0
  364.      │ £        │ Quit                      │ ^G8,3;^C15,1;Menu Item 1^C│ 0
  365.   │    │               │                        │
  366.   │    └───────────┐   └───────────────┐        └──────────┐
  367. ┌─┴────────────┐ ┌─┴───────────────┐ ┌─┴────────────────┐  │
  368. │Press ALT-C   │ │ Press ALT Gr-"3"│ │ Don't change this│  │
  369. │here. It tells│ └─────────────────┘ └──────────────────┘  │
  370. │Concord that  │┌─────────────────────────────────────────┬┘
  371. │it's a cursor ││ ^G8,3;^C15,1;Menu Item 1^CN,N;^GN,N;    │
  372. │selection.    │└─────────────────────────────────────────┘
  373. └──────────────┘
  374.  
  375. The data field is the problem here, but if you only know how to read
  376. it, it's no problem at all. I'll explain it here, but afterwards you'll
  377. have to "uncode"it yourself :-)
  378.  
  379. ^G8,3;                    -> Goto position 8,3. It's here our menu items
  380.                              starts. (As we wrote on the paper)
  381.  
  382. ^C15,1;                   -> Set the color to white foreground and blue
  383.                              background. (It's highlighted)
  384.  
  385. Menu Item 1               -> Exactly the same text as we wrote in our
  386.                              menu. (It will overwrite the menu text, but
  387.                              with the new colors)
  388.  
  389. ^CN,N;                    -> Set the fore- and background color back to
  390.                              default.
  391.  
  392. ^GN,N;                    -> Set the cursor to its default location.
  393.  
  394.  
  395. Now we have highlighted the item. Next we have to "un-highlight" it, so
  396. it looks like the same text we drawed in our menu, when the user press
  397. the cursor key to highlight the next item.
  398.  
  399. The easiest way to do this, is to press the nummeric "+" key. It will
  400. copy the line, we just wrote, to a buffer. Then press the nummeric
  401. "*" key, and we will copy the line in the buffer to a new line in the
  402. menu editor.
  403.  
  404. The only thing we have to do then, is to edit the color codes to fit the
  405. ones the original menu item had.
  406.  
  407.  
  408.  KEY │ INPUT    │ MENUTYPE                  │ DATAFIELD                 │ SEC
  409.  Aut │ #        │ Show ANSI w/ hotkeys      │ TESTMENU.ANS              │ 0
  410.  Sel │ $        │ Gosub menu                │ SETUP                     │ 0
  411.      │ £        │ Quit                      │ ^G8,3;^C15,1;Menu Item 1^C│ 0
  412.      │ £        │ Quit                      │ ^G8,3;^C9,0;Menu Item 1^CN│ 0
  413.                                                      │
  414. ┌────────────────────────────────────────────────────┘
  415. └─ ^G8,3;^C9,0;Menu Item 1^CN,N;^GN,N;
  416.  
  417. You've just maked your first selection!
  418.  
  419.  
  420.  
  421.                               * STEP 7 *
  422.  
  423. Exit the TESTMENU.ANS, and load in the TOP.ANS in the menu editor. Add
  424. a "Goto Menu" item, and make it call TESTMENU.MNU.
  425.  
  426. Exit the menu editor.
  427.  
  428.  
  429.                               * STEP 8 *
  430.  
  431. C.BAT
  432.  
  433. Enter the TESTMENU.MNU. Now the "Menu Item 1" should be highlighted. Try
  434. to press Enter, and Concord will load the SETUP.MNU
  435.  
  436.  
  437. That's it 'n' that's that ;-)
  438.  
  439.  
  440.  
  441.  
  442.                               * STEP 9 *
  443.  
  444. Menu Item 2.
  445.  
  446. Here the user can toggle, if he's a SysOp or Not. (Not very realistic
  447. but..... );-)
  448.  
  449. M.BAT
  450.  
  451. Open the TESTMENU.MNU
  452.  
  453. Start by adding a line in the buttom. Make it an selectable by pressing
  454. ALT-M in the KEY column. Enter "$" in the INPUT column. (ALT Gr-"4")
  455.  
  456. In the MENUTYPE column select "Other | Edit user info".
  457.  
  458. In DATA column write SYSOP (The setting we are going to toggle)
  459.  
  460. Add a new line. The KEY column should be empty (ALT-C - remember??)
  461. The INPUT column should contain a "£" (ALT Gr-"3")
  462.  
  463. There should be noting in the MENUTYPE column (Quit)
  464.  
  465. In the data field we have to tell Concord what to write. But the fact
  466. that it's an toggle menu, and the @SYSOP@ macro can be changed, we have
  467. to make it write the current status of this macro too.
  468.  
  469. It should look like this:
  470.  
  471. ^G8,4;^C15,1;Menu Item 2^C9,0;^G22,4;@SYSOP@.04^CN,N;^GN,N;
  472.  
  473. Try to look at it, the difference is not that big compared to the first
  474. example, the only new thing is that we tell Concord to write the @SYSOP@
  475. macro too (whith the original colors), because this can change while
  476. we're in the menu.
  477.  
  478. Copy the line to the buffer ("+"), and copy it to a new line ("*").
  479.  
  480. Change the colors to the originals:
  481.  
  482. ^G8,4;^C9,0;Menu Item 2^C9,0; : @SYSOP@.04^CN,N;^GN,N;
  483.  
  484. Repeat STEP 8
  485.  
  486. That's it 'n' that's that ;-)
  487.  
  488.  
  489.  
  490.  
  491.                               * STEP 10 *
  492.  
  493. Menu Item 3 ; This is the different one..
  494.  
  495. Here the user should enter the first line in his/her address.
  496.  
  497. M.BAT
  498.  
  499. Open the TESTMENU.MNU
  500.  
  501. Start by adding a line in the button. Make it an selectable by pressing
  502. ALT-M in the KEY column. Enter "$" in the INPUT column. (ALT Gr-"4")
  503.  
  504. In the MENUTYPE column select "Other | Edit user info".
  505.  
  506. Here I need to explain what the datafield should contain, 'cause it
  507. may sound a little confusing.
  508.  
  509.  
  510. ADDRESS1                        -> The setting we're going to change.
  511. ^G22,5;                         -> Where shall the input field show up?
  512. ^C15,1;                         -> The color of the input field
  513. ^L25;                           -> The lenght of the input field
  514.  
  515. This is the first half of the data field. You have to know, that Concord
  516. will pause and wait for an input after the ^L-code. This means, that
  517. until now, we've defined where the input field shall show up, what color
  518. it has and the length of it. Concord is now waiting for the user to enter
  519. the information and press the Enter key.
  520.  
  521. The next half is were we define what Concord shall do when the user has
  522. pressed the Enter key.
  523.  
  524. ^G22,5;                         -> Go back to we're the macro starts
  525. ^C9,0;                          -> Change the color to normal
  526. @ADDRESS1@.25                   -> Write the new entered information
  527.  
  528. The data line should look like this when it's done:
  529.  
  530. ADDRESS1 ^G22,5;^C14,1;^L25;^G22,5;^C9,0;@ADDRESS1@.25^CN,N;^GN,N;
  531.  
  532. It may sound a little confusing, but as i wrote before, when you know
  533. what to do, it very easy.
  534.  
  535. Add a new line. The KEY column should be empty (ALT-C - remember??)
  536. The INPUT column should contain a "£" (ALT Gr-"3")
  537.  
  538. There should be noting in the MENUTYPE column (Quit)
  539.  
  540. In the data field we have to tell Concord what to write. But the fact
  541. that it's a item that can be changed while the user is in the menu, we
  542. have to make it write the current status of this macro too.
  543.  
  544. Like this:
  545.  
  546. ^G8,5;^C14,1;Menu Item 3^C9,0; :^G22,5;@ADDRESS1@.25^CN,N;^GN,N;
  547.  
  548. Copy the line to the buffer ("+"), and copy it to a new line ("*").
  549.  
  550. Change the colors to the originals:
  551.  
  552. ^G8,5;^C9,0;Menu Item 3^C9,0; :^G22,5;@ADDRESS1@.25^CN,N;^GN,N;
  553.  
  554. Repeat STEP 8
  555.  
  556. That's it 'n' that's that ;-)
  557.  
  558.  
  559.  
  560.                               * STEP 11 *
  561.  
  562. You've now maked a selection menu. It wasn't hard or what?? I'll say,
  563. that it's the two first menus you make that will take the longest time.
  564. When you're in it, you can do it without thinking at all. And off course
  565. your BBS looks much better with the selection menus :-)
  566.  
  567.  
  568. I hope you'll enjoy using Concord. I do! In my opinion it's the best and
  569. most flexible BBS software I've ever seen.
  570.  
  571. If you have any questions, just write your local support site. All of
  572. them would be glad to help you.
  573.  
  574.  
  575. If you have any comments to this document, please write me a E-mail.
  576.  
  577. Kind regards,
  578.  
  579.      Bjarke V. Lindberg
  580.  
  581.      Fido      : 2:235/335
  582.      Internet  : bjarke@ibm.net.dk
  583.  
  584. <EOF>
  585.